/**
 * Created by Administrator on 2016/8/16.
 */
angular.module('MBD')
    .constant('OPS', {
        yearsCombiOptions: [
            {
                "series": [{
                    "type": "pie",
                    "radius": ["6%", "30%"],
                    "center": ["76%", "80%"],
                    "roseType": "radius",
                    "data": [{
                        "value": 1075.46,
                        "name": "技术开发"
                    }, {"value": 955.57, "name": "技术服务"}, {"value": 532.59, "name": "技术转让"}, {
                        "value": 101.6,
                        "name": "技术咨询"
                    }],
                    startAngle: 270
                }, {
                    "type": "radar",
                    "data": [{"value": [0.011775181914174504, 0.19731805929919144, 0.4926218697357367, 85.54, 0.89]}]
                }, {
                    "data": [[148.06, 8945, "新材料及其应用", 0.0055552428871054275], [898.37, 75415, "电子信息技术", 0.03370703466492573], [320.98, 20697, "新能源与高效节能", 0.012043238294631234], [474.78, 22658, "先进制造技术", 0.017813847210184485], [44.12, 3299, "航空航天技术", 0.001655391842355069], [7.46, 813, "核应用技术", 0.00027990079655414353], [53.52, 5981, "农业技术", 0.002008081854098896], [224.85, 10614, "现代交通", 0.008436420121340372], [144.14, 37663, "城市建设与社会发展", 0.005408163648165448], [189.32, 26669, "环境保护与资源综合利用技术", 0.007103326917376735], [159.63, 13589, "生物、医药和医疗器械技术", 0.005989351763262457]],
                    "type": "scatter"
                }]
            }, {
                "series": [{
                    "type": "pie",
                    "radius": ["6%", "30%"],
                    "center": ["76%", "80%"],
                    "roseType": "radius",
                    "data": [{
                        "value": 1264.16,
                        "name": "技术开发"
                    }, {"value": 1142.19, "name": "技术服务"}, {"value": 538.52, "name": "技术转让"}, {
                        "value": 94.14,
                        "name": "技术咨询"
                    }]
                }, {
                    "type": "radar",
                    "data": [{"value": [0.014217410831243685, 0.14023930392498962, 0.3743710187875572, 83.18, 0.91]}]
                }, {
                    "data": [[128.77, 7937, "新材料及其应用", 0.004237235152237078], [950.2, 81129, "电子信息技术", 0.03126676121500094], [401.27, 18961, "新能源与高效节能", 0.013203971030039386], [450.45, 19975, "先进制造技术", 0.014822261196902936], [95.28, 3494, "航空航天技术", 0.003135231539218364], [72.87, 1023, "核应用技术", 0.0023978203428090066], [98.17, 5669, "农业技术", 0.003230328297702212], [287.23, 9568, "现代交通", 0.009451433196995073], [183.01, 29905, "城市建设与社会发展", 0.006022026910079269], [168.69, 21407, "环境保护与资源综合利用技术", 0.005550820826519162], [203.07, 14684, "生物、医药和医疗器械技术", 0.006682110292496569]],
                    "type": "scatter"
                }]
            }, {
                "series": [{
                    "type": "pie",
                    "radius": ["6%", "30%"],
                    "center": ["76%", "80%"],
                    "roseType": "radius",
                    "data": [{
                        "value": 1634.24,
                        "name": "技术开发"
                    }, {"value": 1545.6, "name": "技术服务"}, {"value": 610.1, "name": "技术转让"}, {
                        "value": 116.64,
                        "name": "技术咨询"
                    }]
                }, {
                    "type": "radar",
                    "data": [{"value": [0.017012121027347442, 0.2852912142152024, 0.3254858876398123, 76.15, 0.98]}]
                }, {
                    "data": [[189.96, 9360, "新材料及其应用", 0.004862552763407473], [1172.24, 88538, "电子信息技术", 0.030006732214028088], [544.7, 22357, "新能源与高效节能", 0.01394310639201964], [568.1, 21135, "先进制造技术", 0.014542094256115945], [49.06, 4168, "航空航天技术", 0.0012558266928446547], [33.13, 885, "核应用技术", 0.0008480541853637058], [85.58, 6091, "农业技术", 0.0021906573251864155], [528.33, 9118, "现代交通", 0.01352407086487192], [231.32, 32423, "城市建设与社会发展", 0.005921276612083684], [258.26, 20236, "环境保护与资源综合利用技术", 0.0066108805889535365], [245.91, 15290, "生物、医药和医疗器械技术", 0.006294748105124928]],
                    "type": "scatter"
                }]
            }, {
                "series": [{
                    "type": "pie",
                    "radius": ["6%", "30%"],
                    "center": ["76%", "80%"],
                    "roseType": "radius",
                    "data": [{
                        "value": 2169.8,
                        "name": "技术开发"
                    }, {"value": 1904.14, "name": "技术服务"}, {"value": 523.39, "name": "技术转让"}, {
                        "value": 166.22,
                        "name": "技术咨询"
                    }]
                }, {
                    "type": "radar",
                    "data": [{"value": [0.018578314380644858, 0.2196620583717357, 0.27056959020147003, 84.6, 1.01]}]
                }, {
                    "data": [[203.9, 10872, "新材料及其应用", 0.004280286332052816], [1222.3, 99241, "电子信息技术", 0.025658626697734953], [611.9, 23071, "新能源与高效节能", 0.012845057413355166], [716.5, 20105, "先进制造技术", 0.015040829607238071], [66.6, 4726, "航空航天技术", 0.001398072926506707], [158, 913, "核应用技术", 0.003316749585406302], [202.1, 6699, "农业技术", 0.004242500577282365], [500.9, 10307, "现代交通", 0.01051493586917732], [496.6, 40979, "城市建设与社会发展", 0.01042466989944791], [326.6, 20880, "环境保护与资源综合利用技术", 0.006856015282238596], [258.3, 18635, "生物、医药和医疗器械技术", 0.005422255809559797]],
                    "type": "scatter"
                }]
            }, {
                "series": [{
                    "type": "pie",
                    "radius": ["6%", "30%"],
                    "center": ["76%", "80%"],
                    "roseType": "radius",
                    "data": [{
                        "value": 2635.95,
                        "name": "技术开发"
                    }, {"value": 2630.07, "name": "技术服务"}, {"value": 1020.84, "name": "技术转让"}, {
                        "value": 150.22,
                        "name": "技术咨询"
                    }]
                }, {
                    "type": "radar",
                    "data": [{"value": [0.022806669453872917, 0.3511754827875735, 0.23333074299243897, 77.34, 1.24]}]
                }, {
                    "data": [[332.49, 12415, "新材料及其应用", 0.005165222173373373], [1930.12, 118800, "电子信息技术", 0.029984356285215834], [648.25, 21268, "新能源与高效节能", 0.010070544298743687], [985.53, 24753, "先进制造技术", 0.015310178978389303], [135.97, 5500, "航空航天技术", 0.002112289870112116], [383.64, 1108, "核应用技术", 0.005959835888576981], [180.92, 9188, "农业技术", 0.002810586771351651], [649.11, 10147, "现代交通", 0.010083904372938704], [454.68, 38643, "城市建设与社会发展", 0.007063440156965336], [454.37, 21300, "环境保护与资源综合利用技术", 0.007058624316267133], [282.01, 19120, "生物、医药和医疗器械技术", 0.004381016888065881]],
                    "type": "scatter"
                }]
            }, {
                "series": [{
                    "type": "pie",
                    "radius": ["6%", "30%"],
                    "center": ["76%", "80%"],
                    "roseType": "radius",
                    "data": [{
                        "value": 2773.41,
                        "name": "技术开发"
                    }, {"value": 3416.85, "name": "技术服务"}, {"value": 1083.76, "name": "技术转让"}, {
                        "value": 195.1,
                        "name": "技术咨询"
                    }]
                }, {
                    "type": "radar",
                    "data": [{"value": [0.0253251799585663, 0.16034332763709802, 0.21640510809652672, 84.08, 1.31]}]
                }, {
                    "data": [[321.19, 12859, "新材料及其应用", 0.004300233092743064], [1946.51, 118496, "电子信息技术", 0.02606073264222205], [736.54, 22246, "新能源与高效节能", 0.009861121710292898], [951.34, 25559, "先进制造技术", 0.012736958655157966], [164.09, 6340, "航空航天技术", 0.0021969091447062777], [335.48, 1059, "核应用技术", 0.004491553902529479], [233.02, 11766, "农业技术", 0.003119774324452781], [968.33, 10950, "现代交通", 0.012964428253357484], [735.88, 42853, "城市建设与社会发展", 0.009852285339791916], [680.38, 21707, "环境保护与资源综合利用技术", 0.009109226911300245], [396.37, 21094, "生物、医药和医疗器械技术", 0.0053067760234458364]],
                    "type": "scatter"
                }]
            }, {
                "series": [{
                    "type": "pie",
                    "radius": ["6%", "30%"],
                    "center": ["76%", "80%"],
                    "roseType": "radius",
                    "data": [{
                        "value": 2949.01,
                        "name": "技术开发"
                    }, {"value": 4246.72, "name": "技术服务"}, {"value": 1137.17, "name": "技术转让"}, {
                        "value": 244.29,
                        "name": "技术咨询"
                    }]
                }, {
                    "type": "radar",
                    "data": [{"value": [0.028875796617929755, 0.14835061111535075, 0.1997682438994208, 84.47, 1.35]}]
                }, {
                    "data": [[442.23, 10609, "新材料及其应用", 0.005155890397543249], [2182.63, 119066, "电子信息技术", 0.025446941768739843], [926.91, 19234, "新能源与高效节能", 0.010806698705168831], [1242.55, 31534, "先进制造技术", 0.014486696093587867], [256.04, 7440, "航空航天技术", 0.002985130310894723], [329.68, 806, "核应用技术", 0.0038436875523190604], [309.35, 12380, "农业技术", 0.003606663262284341], [968.35, 16160, "现代交通", 0.011289841183232717], [814.21, 40117, "城市建设与社会发展", 0.00949274703340725], [693.77, 18436, "环境保护与资源综合利用技术", 0.008088555912316168], [411.46, 21255, "生物、医药和医疗器械技术", 0.004797147780505947]],
                    "type": "scatter"
                }]
            }, {
                "series": [{
                    "type": "pie",
                    "radius": ["6%", "30%"],
                    "center": ["76%", "80%"],
                    "roseType": "radius",
                    "data": [{
                        "value": 3047.18,
                        "name": "技术开发"
                    }, {"value": 5058.96, "name": "技术服务"}, {"value": 1466.53, "name": "技术转让"}, {
                        "value": 263.12,
                        "name": "技术咨询"
                    }]
                }, {
                    "type": "radar",
                    "data": [{"value": [0.032024634359168046, 0.14673937121524805, 0.1902597881280598, 84.98, 1.45]}]
                }, {
                    "data": [[445.22, 12442, "新材料及其应用", 0.004526530151619749], [2497.34, 122538, "电子信息技术", 0.025390334685876786], [1064.29, 20894, "新能源与高效节能", 0.010820584823384802], [1350.72, 32071, "先进制造技术", 0.013732704744611263], [277.11, 10079, "航空航天技术", 0.0028173639331461942], [390.13, 404, "核应用技术", 0.003966432792892082], [308.05, 13126, "农业技术", 0.0031319294128890514], [981.89, 11526, "现代交通", 0.00998282801889833], [1209.97, 39616, "城市建设与社会发展", 0.012301706319472052], [800.42, 20887, "环境保护与资源综合利用技术", 0.008137831328241047], [510.65, 23549, "生物、医药和医疗器械技术", 0.005191753788968655]],
                    "type": "scatter"
                }]
            }],
        idMapOption: {
            color: MetisPlugin.colorSet,
            tooltip: {
                trigger: 'item',
                formatter: function (params) {
                    return params.data.name + '的相关产业基地';
                }
            },
            geo: {
                map: 'china',
                label: {
                    emphasis: {
                        show: false
                    }
                },
                selectedMode: 'single',
                zoom: 1,
                roam: 'scale',
                scaleLimit: {
                    min: 1,
                    max: 2.5
                },
                itemStyle: {
                    normal: {
                        areaColor: '#333333',
                        borderColor: '#212121'
                    },
                    emphasis: {
                        areaColor: 'rgba(31,134,237,.6)'
                    }
                },
                regions: [{
                    name: '',
                    selected: true
                }]
            },
            series: [
                {
                    name: '技术交易总量',
                    type: 'scatter',//散点图
                    coordinateSystem: 'geo',//坐标系
                    data: [],
                    symbolSize: 6,
                    label: {
                        normal: {
                            show: false
                        }
                    },
                    itemStyle: {
                        normal: {
                            color: 'rgba(31,134,237,1)'
                        }
                    }
                }
            ]
        }, marketMapOption: {
            color: MetisPlugin.colorSet,
            tooltip: {
                trigger: 'item',
                formatter: function (params) {
                    return params.data.name + params.seriesName;
                }
            },
            legend: {
                orient: 'vertical',
                y: 'bottom',
                x: 'right',
                data: ['技术交易总量', '技术引入总量'],
                textStyle: {
                    color: '#fff'
                },
                selectedMode: 'single',
                selected: {
                    '技术交易总量': true,
                    '技术引入总量': false
                }
            },
            geo: {
                map: 'china',
                label: {
                    emphasis: {
                        show: false
                    }
                },
                selectedMode: 'single',
                zoom: 1,
                roam: 'scale',
                scaleLimit: {
                    min: 1,
                    max: 2.5
                },
                itemStyle: {
                    normal: {
                        areaColor: '#333333',
                        borderColor: '#212121'
                    },
                    emphasis: {
                        areaColor: 'rgba(31,134,237,.6)'
                    }
                },
                regions: [{
                    name: '',
                    selected: true
                }]
            },
            series: [
                {
                    name: '技术交易总量',
                    type: 'scatter',//散点图
                    coordinateSystem: 'geo',//坐标系
                    data: [],
                    symbolSize: 6,
                    label: {
                        normal: {
                            show: false
                        }
                    },
                    itemStyle: {
                        normal: {
                            color: 'rgba(31,134,237,1)'
                        }
                    }
                },
                {
                    name: '技术引入总量',
                    type: 'scatter',//散点图
                    coordinateSystem: 'geo',//坐标系
                    data: [],
                    symbolSize: 6,
                    label: {
                        normal: {
                            show: false
                        }
                    },
                    itemStyle: {
                        normal: {
                            color: 'rgba(191,6,27,1)'
                        }
                    }
                }
            ]
        },
        compareBarOption: {
            color: ['#0a539a', '#1f86ed'],
            tooltip: {
                trigger: 'axis',
                axisPointer: {            // 坐标轴指示器，坐标轴触发有效
                    type: 'shadow'        // 默认为直线，可选为：'line' | 'shadow'
                },
                formatter: function (params, ticket, callback) {
                    return params[0].name + '<br/>' + params[0].seriesName + ':' + params[0].value / (params[0].value + params[1].value) * 100 + '%<br/>' + params[1].seriesName + ':' + params[1].value / (params[0].value + params[1].value) * 100 + '%'
                }
            },
            grid: {
                left: '3%',
                right: '4%',
                bottom: '3%'
            },
            xAxis: [{
                type: 'value',
                interval: 10,
                max: 100,
                axisLine: {
                    show: false
                },
                splitLine: {
                    show: false
                },
                axisTick: {
                    show: false
                },
                axisLabel: {
                    show: false
                }
            }],
            yAxis: [{
                type: 'category',
                data: ['市场发展指数', '平均技术交易额', '技术吸纳额', '技术吸纳量', '技术输出额', '技术输出量', '技术交易总额', '交易转化效率', '技术流动性', 'GDP', 'GDP贡献率'],
                offset: -document.getElementById("marketCompareBar").clientWidth * .465 - 16,
                axisLabel: {
                    textStyle: {
                        color: "#ffffff"
                    },
                    formatter: function (v, i) {
                        v = v.length === 5 ? v + ' ' + ' ' : (v.length === 6 ? v + ' ' : (v.length === 3 ? v + '      ' : v));
                        return v;
                    }
                },
                axisLine: {
                    show: false
                },
                z: 3
            }],
            series: []
        },
        inOutBarOption: {
            color: ['#ff9d10', '#1f86ed', '#f86f00'],
            tooltip: {
                trigger: 'axis'
            },
            legend: {
                data: ['技术输出', '技术引入', '输出/引入'],
                bottom: 0,
                textStyle: {
                    color: '#ffffff'
                }
            },
            grid: {
                top: 40,
                bottom: 30
            },
            xAxis: [
                {
                    type: 'category',
                    data: ['2007', '2008', '2009', '2010', '2011', '2012', '2013', '2014', '2015', '2016'],
                    axisLine: {
                        lineStyle: {
                            color: "#888888"
                        }
                    },
                    axisLabel: {
                        show: false
                    },
                    axisTick: {
                        show: false
                    }
                }
            ],
            yAxis: [
                {
                    type: 'value',
                    name: '成交量',
                    axisLabel: {
                        formatter: '{value} ml',
                        show: false
                    },
                    axisLine: {
                        lineStyle: {
                            color: "#888888"
                        }
                    },
                    splitLine: {
                        show: false
                    },
                    axisTick: {
                        show: false
                    }
                },
                {
                    type: 'value',
                    name: '',
                    axisLine: {
                        show: false
                    },
                    splitLine: {
                        show: false
                    },
                    axisLabel: {
                        show: false
                    },
                    axisTick: {
                        show: false
                    }
                }
            ],
            series: [
                {
                    name: '技术输出',
                    type: 'bar',
                    data: []
                },
                {
                    name: '技术引入',
                    type: 'bar',
                    data: []
                },
                {
                    name: '输出/引入',
                    type: 'line',
                    yAxisIndex: 1,
                    data: []
                }
            ]
        },
        yearsFunOption: {
            color: ['#8ed7e2', '#1f86ed'],
            smooth: true,
            grid: {
                left: 0,
                right: '6%',
                bottom: 0,
                containLabel: true
            },
            tooltip: {
                formatter: function (params) {
                    // console.log(params);
                }
            },
            xAxis: {
                name: '年份',
                type: 'category',
                data: [],
                boundaryGap: false,
                splitLine: {
                    show: false,
                },
                axisLine: {
                    lineStyle: {
                        color: '#888'
                    }
                }
            },
            yAxis: {
                name: '亿元',
                axisLine: {
                    lineStyle: {
                        color: '#888'
                    }
                },
                splitLine: {
                    show: false,
                }
            },
            series: []
        }
    });
